<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">	
			<a class="mui-icon mui-icon-back mui-action-back mui-pull-left"></a>
			<h1 class="mui-title ">练习</h1>
		</header>
		<div class="mui-content">
			<div class="mui-input-group" style="margin-top: 10px;">
				<ul class="mui-table-view">
					<li class="mui-table-view-cell" id="btnOrder">
						<a class="mui-navigate-right" v-on:click="openPractice()">
							顺序练习
						</a>
					</li>
					<li class="mui-table-view-cell" id="btnRandom">
						<a class="mui-navigate-right" v-on:click="openPractice()">
							随机练习
						</a>
					</li>
					<li class="mui-table-view-cell" id="btnRandom">
						<a class="mui-navigate-right" v-on:click="openPractice()">
							难题攻克
						</a>
					</li>
					<li class="mui-table-view-cell" id="btnRandom">
						<a class="mui-navigate-right" v-on:click="openPractice()">
							易错巩固
						</a>
					</li>
					<li class="mui-table-view-cell" id="btnMyself">
						<a class="mui-navigate-right" v-on:click="openPractice()">
							我的错题
						</a>
					</li>
				</ul>
			</div>
			<div class="mui-input-group" style="margin-top: 10px;">
				<div class="mui-table">
					<div class="mui-table-cell mui-col-xs-6" style="border: solid red 0px; ">
	                    <h4 class="mui-ellipsis" style="padding-left: 10px; padding-top: 5px; height: 32px;">我的错题</h4>
	               </div>
				</div>
				<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
					<!--<li class="mui-table-view-cell">
			            <div class="mui-table">
			                <div class="mui-table-cell mui-col-xs-12 mui-navigate-right" style="border: solid red 0px; ">
			                    <h5 class="mui-ellipsis-2" style="padding-top: 5px;">2019年5月份行政处罚案件信息公开</h5>
			                </div>
			            </div>
			        </li>-->
			        <li class="mui-table-view-cell">
			            <div class="mui-table">
			                <div class="mui-table-cell mui-col-xs-12 mui-navigate-right" style="border: solid red 0px; " v-on:click="openFile(item.Id)">
			                    <h5 class="mui-ellipsis-2" style="padding-top: 5px;">2019年5月份行政处罚案件信息公开</h5>
			                </div>
			            </div>
			        </li>
			        
			    </ul>
			    
			</div>
			<div class="mui-bar mui-bar-tab" style="text-align: center;">
				<button type="button" class="mui-btn mui-btn-danger" v-on:click="clearPractice()">清除练习记录</button>
			</div>
		</div>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/vue.min.js" ></script>
		<script type="text/javascript" src="../js/app.js?v=20190610" ></script>
		<script type="text/javascript">
			mui.init()
			var vm = new Vue({
				el: '.mui-content',
				data: {
					rows:10,
					page:1,
					total:0,
					records:0,
					data: [] //列表信息流数据
				}
			});
			var webview_detail = null; //详情页webview
			mui.plusReady(function(){
				var setting = app.getSetting();
				var pagination = {rows:10,page:1};
				var ajaxUrl = setting.ServerUrl +"/api/TrainContent/GetPageList?orderName=Code&orderType=&rows=10&page=1&queryJson=";
				
				//预加载详情页
				webview_detail = mui.preload({
					id: 'practiceRead',
					url: 'practiceRead.html?v=' + parseInt(Math.random()*1000000000),
				});
			});
			
			function openPractice() {
				
				//触发子窗口变更
				mui.fire(webview_detail, 'get_detail', {
					
				});
				setTimeout(function() {
					webview_detail.show("slide-in-right", 300);
				}, 150);
			}
			
			function openWindow() {
				mui.openWindow({
					id:"practiceInfo",
					url:"practiceInfo.html?v=" + parseInt(Math.random()*1000000000),
					show:{aniShow: 'pop-in'},
					extras: {refContentId: ""},
					waiting: {autoShow: false, /*自动显示等待框，默认为true*/}
				});
			}
			/**
			 * 清除记录
			 */
			function clearPractice(){
				mui.confirm('确认清除所有练习记录？', '确认', ['取消','确定'], function (e) {
			    	if(e.index == 0)
			    		return;
			    	
			    	app.setPractices({});
			    	mui.toast("清除记录成功！");
			    })
			}
		</script>
	</body>

</html>